{% extends "base.html" %}
  {% block content %}
    {% from "forms/macros.html" import render_field_busqueda %}
     <SCRIPT LANGUAGE="JavaScript">
	
		url_1 = "/item/seleccionar_tipo_item/ID/"	
		
		id_href_1 = 'seleccionar_tipo_item'
		 
		function obtener_id(id) {
        	link_1 = document.getElementById(id_href_1)        	
        	new_url_1 = url_1.replace('ID', id)        	
        	link_1.href = new_url_1           
		}
    
    </SCRIPT>
    <h3> Fases del Proyecto </h3>
    <form method="POST" action={{ url_for('items.seleccionar_fase') }} class="form">
   		{{ form.csrf_token }} 	
   <div style="overflow:auto; width: 770px; height: 550px;" > 
   	 <table>
		{% for fase in fases %}			
   				<tr >
   				  <th><input type = "radio" name = "seleccionado" id="select" onchange="obtener_id({{fase.id}})"></th>      			      			  
      			  <td> <center>{{ fase.nombre }} <center></td>  			    			 
      			
   				</tr>  		 	
		{% endfor %}				
		
	</table> 
	</div> 
		 <div class="buttons">                
       			 <button type="submit" class="button green">
               		 <a href="" id="seleccionar_tipo_item">Aceptar</a>
        		</button>
        		<button type="submit" class="button green">
                		<a href="{{ url_for('items.administracion_item') }}">Cancelar</a>
        		</button>       		
    	</div>  
   
    </form>    
  {% endblock %}